package com.demo.employees.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.demo.employees.dao.EmployeeDAO;
import com.demo.employees.model.Employee;
import com.demo.employees.service.EmployeeService;

/**
 * Service的其中一个实现类
 * @author: jie.deng
 * @time: 2017年4月15日 上午1:40:02
 */
//@Service("EmployeeServiceSpringImpl")
public class EmployeeServiceSpringImpl implements EmployeeService {
	
	@Autowired
	private EmployeeDAO employeeDAO;

	@Override
	public void saveEmployee(Employee employee) {
		employeeDAO.saveEmployee(employee);
	}

	@Override
	public void updateEmployee(Employee employee) {
		employeeDAO.updateEmployee(employee);
	}

	@Override
	public Employee getById(Long id) {
		return employeeDAO.getById(id);
	}

	@Override
	public List<Employee> findAll() {
		return employeeDAO.findAll();
	}

	@Override
	public int getCount() {
		return employeeDAO.getCount();
	}

	@Override
	public void deleteById(Long id) {
		employeeDAO.deleteById(id);
	}

}
